// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 员工分页 GET /supplyChain/account */
export async function listPage4(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPage4Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespSupplyChainAccountVo>(
    `/barter-user/supplyChain/account`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 新增员工 POST /supplyChain/account */
export async function add6(
  body: API.SupplyChainAccountDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/supplyChain/account`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 员工详情 GET /supplyChain/account/${param0} */
export async function detail6(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detail6Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseSupplyChainAccountVo>(
    `/barter-user/supplyChain/account/${param0}`,
    {
      method: "GET",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 编辑员工 PUT /supplyChain/account/${param0} */
export async function edit2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.edit2Params,
  body: API.SupplyChainAccountDto,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-user/supplyChain/account/${param0}`,
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      params: { ...queryParams },
      data: body,
      ...(options || {}),
    }
  );
}

/** 删除员工 DELETE /supplyChain/account/${param0} */
export async function del10(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.del10Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-user/supplyChain/account/${param0}`,
    {
      method: "DELETE",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 管理员状态切换 POST /supplyChain/account/disable */
export async function disable2(
  body: API.IdDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/supplyChain/account/disable`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 当前管理员更新 POST /supplyChain/account/upInfo */
export async function upInfo(
  body: API.UpInfoDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-user/supplyChain/account/upInfo`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}
